//
//  MoreNewSongsModel.m
//  NewMusic
//
//  Created by dllo on 15/11/14.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "MoreNewSongsModel.h"
#import "ListenDataSongsModel.h"
@implementation MoreNewSongsModel
-(instancetype)initWithDictionary:(NSDictionary *)dictioary {
    self = [super init];
    if (self) {
        self.songs = [NSArray array];
        self.songList = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dictioary];
    }
    return self;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"description"]) {
        self.Description = value;
    }
}
-(void)setValue:(id)value forKey:(NSString *)key {
    if ([key isEqualToString:@"albumId"]) {
        self.albumId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"publishYear"]) {
    self.publishYear = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"week"]) {
    self.week = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"year"]) {
    self.year = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"type"]) {
        self.type = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"singerId"]) {
        self.singerId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"favoriteCount"]) {
        self.favoriteCount = [NSString stringWithFormat:@"%@", value];
    }
    else if ([key isEqualToString:@"songList"]) {
        NSArray *array = (NSArray *)value;
        for (NSDictionary *dic in array) {
            ListenDataSongsModel *model = [[ListenDataSongsModel alloc]initWithDictionary:dic];
            [self.songList addObject:model];
            [model release];
        }
    }else {
        [super setValue:value forKey:key];
    }
}
@end
